﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class LuaFormLogicWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(LuaFormLogic);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 8, 8);
			
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaOpen", _g_get_luaOpen);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaUpdate", _g_get_luaUpdate);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaClose", _g_get_luaClose);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaCover", _g_get_luaCover);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaPause", _g_get_luaPause);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaRefocus", _g_get_luaRefocus);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaResume", _g_get_luaResume);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaReveal", _g_get_luaReveal);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaOpen", _s_set_luaOpen);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaUpdate", _s_set_luaUpdate);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaClose", _s_set_luaClose);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaCover", _s_set_luaCover);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaPause", _s_set_luaPause);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaRefocus", _s_set_luaRefocus);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaResume", _s_set_luaResume);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaReveal", _s_set_luaReveal);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new LuaFormLogic();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
			}
            return LuaAPI.luaL_error(L, "invalid arguments to LuaFormLogic constructor!");
            
        }
        
		
        
		
        
        
        
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaOpen(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaOpen);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaUpdate(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaUpdate);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaClose(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaClose);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaCover(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaCover);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaPause(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaPause);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaRefocus(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaRefocus);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaResume(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaResume);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_luaReveal(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.luaReveal);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaOpen(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaOpen = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaUpdate(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaUpdate = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaClose(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaClose = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaCover(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaCover = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaPause(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaPause = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaRefocus(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaRefocus = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaResume(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaResume = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_luaReveal(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                LuaFormLogic gen_to_be_invoked = (LuaFormLogic)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.luaReveal = translator.GetDelegate<System.Action>(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
		
		
		
		
    }
}
